//
//  BaseViewController.m
//  项目三
//
//  Created by rimi on 15/9/28.
//  Copyright (c) 2015年 rimi. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

- (void)initializeUserInterface; /**< 初始化用户界面 */

@end

@implementation BaseViewController
#pragma mark - 生命周期
- (void)viewDidLoad {
    [super viewDidLoad];
    [self initializeUserInterface];
}
#pragma mark - init
- (void)initializeUserInterface {

    self.view.backgroundColor = COLOR(205, 205, 205, 1);
    self.view.frame = DHFlexibleFrame(CGRectMake(0, 0, ORIGIN_WIDTH, ORIGIN_HEIGHT));
    [self.view addSubview:self.titleImageView];
    CALayer *layer = [CALayer layer];
    layer.contents = (__bridge id)([UIImage imageNamed:@"二级菜单下面的色条_05"]).CGImage;
    layer.bounds = DHFlexibleFrame(CGRectMake(0, 0, 768, 2));
    layer.position = DHFlexibleCenter(CGPointMake(374, 81));
    [self.view.layer addSublayer:layer];
}
#pragma mark - getter
- (UIView *)baseNavigationBar {
    
    if (!_baseNavigationBar) {
        _baseNavigationBar = [[UIView alloc] initWithFrame:DHFlexibleFrame(CGRectMake(0, 0, ORIGIN_WIDTH - 60, 80))];
        _baseNavigationBar.backgroundColor = COLOR(205, 205, 205, 1);
    }
    return _baseNavigationBar;
}
- (UIImageView *)titleImageView {

    if (!_titleImageView) {
        _titleImageView = [[UIImageView alloc] initWithFrame:DHFlexibleFrame(CGRectMake(20, 20, 141, 37))];
    }
    return _titleImageView;
}
@end
